package net.bithappens.hnqe.graph;

import net.bithappens.hnqe.IllegalParamException;


public class EntryProperty {

	private String name;
	
	private EntryValue entryValue;


	public EntryProperty(String name, EntryValue graphValue) throws IllegalParamException {
		if(name == null || name.isEmpty() || graphValue == null){
			throw new IllegalParamException("the name must not be null or empty and the value must be set");
		}
		this.name = name;
		this.entryValue = graphValue;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public EntryValue getValue() {
		return entryValue;
	}

	public void setValue(EntryValue value){
		this.entryValue = value;
	}

	@Override
	public String toString() {
		return name + ":" + entryValue.getValue();
	}
		
}
